package com.cirkana;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateUtil {

	public static SimpleDateFormat dateFormat = new SimpleDateFormat(
			"yyyy-MM-dd HH:mm:ss");
	public static SimpleDateFormat presentationDateFormat = new SimpleDateFormat(
			"dd/MM/yyyy HH:mm:ss");

	public static Date getDate() {
		return Calendar.getInstance().getTime();
	}

	public static Date getDate(int year, int month, int day) {
		Calendar c = Calendar.getInstance();
		c.clear();
		c.set(year, month, day);
		return c.getTime();
	}

	public static Date getDate(int year, int month, int day, int hourOfDay,
			int minute, int second) {
		Calendar c = Calendar.getInstance();
		c.clear();
		c.set(year, month, day, hourOfDay, minute, second);
		return c.getTime();
	}

	public static String getPresentationDate() {
		return DateUtil.getPresentationDate(getDate());
	}

	public static String getPresentationDate(Date date) {
		return presentationDateFormat.format(date);
	}

}
